import hashlib

import sys


def cal_sha1_string(s):
    return str(hashlib.sha1(s.encode("utf-8")).hexdigest())

def cal_md5_string(s):
    return str(hashlib.md5(s.encode("utf-8")).hexdigest())

def ac_register_code(machine_code):
    machine_code_hex_auth = machine_code.replace(' ', '#&#')
    print(cal_sha1_string(cal_md5_string(machine_code_hex_auth)))

ac_register_code(sys.argv[1])